# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=soundtouch
pkgver=2.3.2
pkgrel=4
pkgdesc="Audio Processing library for changing Tempo, Pitch and Playback Rates"
url="http://www.surina.net/soundtouch/"
arch="all"
license="LGPL-2.0-or-later"
makedepends="cmake samurai"
subpackages="$pkgname-dev"
source="https://www.surina.net/soundtouch/soundtouch-$pkgver.tar.gz
	no-fast.patch
	"
builddir="$srcdir/$pkgname"
options="!check" # no tests

# secfixes:
#   2.1.2-r0:
#     - CVE-2018-17096
#     - CVE-2018-17097
#     - CVE-2018-17098

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_SHARED_LIBS=ON \
		-DOPENMP=ON \
		-DNEON=OFF
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
72cd38f3e11f3c55ff7ed3691fd9a749a5f8d072e08ed03f2fd43a8664962138afaf3e4647116940e86f6ae374a1ba3bcd4b108280da29f3ffa6091cf383ea35  soundtouch-2.3.2.tar.gz
4c46d42f07d4de27de7492e0f53c984949ce1724257e54947d85258bad7dd2373546b47590212a28a7c4d702acff83bed7e20dc2242f55f036296ce4e9b1d421  no-fast.patch
"
